package com.blog.service;

import com.blog.mapper.SecBusinessMapper;
import com.blog.seckill.business.SecBusiness;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName SecBusinessService
 * @Destription
 * @Author 天堂小野花
 * @Date 2025/7/4  16:32
 * @Version 1.0
 */
@Service
public class SecBusinessService {
    @Autowired
    SecBusinessMapper secBusinessMapper;

    public List<SecBusiness> initBusiness(){
        return secBusinessMapper.initBusiness();
    }

    public int addBusiness(SecBusiness secBusiness) {
        return secBusinessMapper.insert(secBusiness);
    }

    public int updateBusinessStatus(SecBusiness secBusiness) {
        return secBusinessMapper.updateByPrimaryKeySelective(secBusiness);
    }
}
